package org.farm.common.response.enums;

import lombok.Getter;

/**
 * @author Frank Zou
 * @version v0.0.1
 * @date 2025/4/9
 * @description
 */
public enum ResultCodeEnums implements ExceptionCode {
    SUCCESS(200, "成功"),
    SYSTEM_ERROR(1000, "系统异常"),
    VALIDATION_ERROR(1001, "参数校验失败"),
    RESOURCE_NOT_FOUND(1002, "资源不存在"),
    UNAUTHORIZED(1003, "未授权访问"),
    BUSINESS_ERROR(1004, "业务异常");

    private final Integer code;
    private final String message;

    ResultCodeEnums(int code, String message) {
        this.code = code;
        this.message = message;
    }


    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
